#include<iostream>
using namespace std;

class proto
{
	public:
		proto()
		{
			
		}
		virtual proto* clone() const =0;
};

class sub_proto : public proto
{
	public:
		sub_proto()
		{
			
		}
		proto* clone() const
		{
			return new sub_proto(*this);
		}
};


int main()
{
	proto *p1=new sub_proto();
	proto *p2=p1->clone();
}
